<?php

class Notatka_model extends CI_Model{
    function get_by_id($id){
        $this->db->where('id',$id);

        return $this->db->get('gumis')->row()->get('imie');
    }
    function create($title,$file,$description){
        $this->load->helper('date');
        $data = array(
            'title' => $title,
            'file' => $file,
            'description' => $description,
            'createdon' => mdate('%Y-%m-%d %H:%i:%s', now())
        );

        $this->db->insert('notatka',$data);
    }
}

?>
